<template lang="html">
    <div class="newsDetail">
        <div class="topImg">
            <img :src="result.basc.ad&&result.basc.ad.photo" />
            <div class="swiperbg"></div>
        </div>
        <div class="detailWrap ">
            <div class="sectionTitle">
                <div class="name">{{result.basc.nav&&result.basc.nav[3].name}}</div>
                <p class="sname">{{result.basc.nav&&result.basc.nav[3].en_name}}</p>
                <p class="dian"><span></span></p>
            </div>

            <div class="inviteDetail">
                <div class="detailTitle">
                    <div class="title">
                        {{result.list.name}}
                    </div>
                    <p><span>{{result.list.add_time}}</span><span>浏览：{{result.list.see_num}} 次</span></p>
                </div>
                <div class="context">
                    <div class="">职位描述</div>
                    <div class="cosl" v-html="result.list.disc"></div>
                    <div class="">职位要求</div>
                    <div class="cosl" v-html="result.list.content"></div>
                </div>
            </div>
        </div>
        <footers :basc="result.basc"></footers>
    </div>
</template>

<script>
import Footers from '../Footer'
export default {
    components:{
        Footers
    },
    data:()=>({
        result:{basc:{web_logo:''},list:{title:''}}
    }),
    created(){
        this.getData();
    },
    methods:{
        getData(){
            let nid = this.$route.query.nid;
            this.Query('redetail', {cid:nid}).then(result=>{
                console.log(result);
                this.result = result;
            })
        }
    },
    watch:{
        $route(to, from) {
            if( to.name === 'InviteDetail' ){
                this.getData();
            }
        }
    }
}
</script>

<style lang="less">
.inviteDetail .cosl{
    line-height: 1.5;
    margin-bottom: 20px;
}
.inviteDetail .cosl *{
    color: #999 !important;
}
</style>
